show: Fix segfault if we can't find an object
authorColin Walters <walters@verbum.org>
Sun, 27 Apr 2014 20:31:50 +0000 (16:31 -0400)
committerColin Walters <walters@verbum.org>
Tue, 29 Apr 2014 11:42:30 +0000 (07:42 -0400)
We need to use the original rev here.

src/ostree/ot-builtin-show.c

index de54535a38e019bed1fc6f64a8f8c93cdd1e1af4..9f4568e96a621f386201f88892d13ac77804d9a1 100644 (file)
@@ -269,7 +269,7 @@ ostree_builtin_show (int argc, char **argv, OstreeRepo *repo, GCancellable *canc
               gs_unref_variant GVariant *xattrs = NULL;
               GFileType filetype;
               
-              if (!ostree_repo_load_file (repo, resolved_rev, NULL, &finfo, &xattrs,
+              if (!ostree_repo_load_file (repo, rev, NULL, &finfo, &xattrs,
                                           cancellable, error))
                 goto out;